<?php

namespace app\system\model\category;

use app\system\model\Admin;
use app\system\model\business\Quotation;
use app\system\model\User;
use think\Model;


class IndustryOld extends Model {
    /**
     * @var string 自动写入时间戳
     */
    protected $autoWriteTimestamp = true;

    protected $name = 'industry_old_category';

    public $append = [];

    public function hasChildren(){
        return $this->hasOne(IndustryOld::class, 'pid', 'id');
    }

    public function parentCategory(){
        return $this->hasOne(IndustryOld::class, 'id', 'pid');
    }

    public function children(){
        return $this->hasOne(IndustryOld::class, 'pid', 'id');
    }

}